package com.cmd.project.controller;

import com.cmd.common.core.domain.AjaxResult;
import com.cmd.project.service.impl.AreaServiceImpl;
import com.cmd.project.vo.AreaVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.cmd.common.core.domain.AjaxResult.success;

/**
 * @author cq
 * @date 2024/11/14
 */
@RestController
@RequestMapping("/project/area")
public class AreaController {


    @Autowired
    private AreaServiceImpl areaService;

    @GetMapping("/getArea")
    public AjaxResult getArea() {
        List<AreaVo> area = areaService.getArea();
        return success(area);
    }
}
